package com.algernoon.rpc.springrpc.rmi.httpinvoker;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter;

@Configuration
public class HttpInvokerRmiServerConfig {

	@Autowired
	private IHttpInvokerUserService httpInvokerUserService;
	
	@Bean("/HttpInvokerService")
	public HttpInvokerServiceExporter initHttpInvokerServiceExporter() {
		HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
		exporter.setService(httpInvokerUserService);
		exporter.setServiceInterface(IHttpInvokerUserService.class);
		return exporter;
	}
	
}
